package com.party.mobile.web.dto.mall.output;

import com.party.core.model.mall.MallEvaluateListOutput;
import com.party.core.model.mall.MallGoods;
import org.springframework.beans.BeanUtils;

import java.util.List;
import java.util.Map;

/**
 * @Author: Administrator.
 * @Description:
 * @Date:Created in 2017/8/28 0028 下午 16:24.
 */
public class MallGoodsOutput extends MallGoods {
    private Integer totalStock;
    // 规格名称
    private String specNames;
    private String newPrice;
    // 规格列表
    private List<Map<String, Object>> specList;
    private List<Map<String, Object>> productList;
    private Map<String, Object> firstProduct;
    private MallEvaluateListOutput firstEvaluate; // 最新的一条评价
    private Integer evaluateCount; // 评价数量

    public String getSpecNames() {
        return specNames;
    }

    public void setSpecNames(String specNames) {
        this.specNames = specNames;
    }

    public List<Map<String, Object>> getSpecList() {
        return specList;
    }

    public void setSpecList(List<Map<String, Object>> specList) {
        this.specList = specList;
    }

    public List<Map<String, Object>> getProductList() {
        return productList;
    }

    public void setProductList(List<Map<String, Object>> productList) {
        this.productList = productList;
    }

    public Map<String, Object> getFirstProduct() {
        return firstProduct;
    }

    public void setFirstProduct(Map<String, Object> firstProduct) {
        this.firstProduct = firstProduct;
    }

    public String getNewPrice() {
        return newPrice;
    }

    public void setNewPrice(String newPrice) {
        this.newPrice = newPrice;
    }

    public static MallGoodsOutput transform(MallGoods mallGoods) {
        MallGoodsOutput output = new MallGoodsOutput();
        BeanUtils.copyProperties(mallGoods, output);
        return output;
    }

    public Integer getTotalStock() {
        return totalStock;
    }

    public void setTotalStock(Integer totalStock) {
        this.totalStock = totalStock;
    }

    public Integer getEvaluateCount() {
        return evaluateCount;
    }

    public void setEvaluateCount(Integer evaluateCount) {
        this.evaluateCount = evaluateCount;
    }

    public MallEvaluateListOutput getFirstEvaluate() {
        return firstEvaluate;
    }

    public void setFirstEvaluate(MallEvaluateListOutput firstEvaluate) {
        this.firstEvaluate = firstEvaluate;
    }
}
